#include "CircleObstacleFactory.h"

CircleObstacleFactory::CircleObstacleFactory(void)
{
}

CircleObstacleFactory::~CircleObstacleFactory(void)
{
}

Element* CircleObstacleFactory::createElement( XMLElement* element)
{
	return this->createCircleObstacle(element);
}

CircularObstacle * CircleObstacleFactory::createCircleObstacle( XMLElement* obstacleElement)
{
	CircularObstacle* obstacle = new CircularObstacle();

	string id = FactoryUtil::getInstance()->buildId(obstacleElement);
	Position *position = FactoryUtil::getInstance()->buildPosition(obstacleElement);
	float radius = FactoryUtil::getInstance()->buildRadius(obstacleElement);

	obstacle->setId(id);
	obstacle->setPosition(position);
	obstacle->setRadius(radius);
	obstacle->setElementColor(FactoryUtil::getInstance()->buildFrogBackgroundColor(obstacleElement));
	obstacle->setLineColor(FactoryUtil::getInstance()->buildFrogLineColor(obstacleElement));
	obstacle->setTexture(FactoryUtil::getInstance()->buildTexture(obstacleElement));

	return obstacle;

}